
package pool.preprocess;

import java.util.Hashtable;
import java.util.Vector;

import pool.tablename.Pool;
import utility.CapitalChar;
import dbmanager.DBManager;
import dbmanager.GetIdName;

public class Defaultvalue implements Process 
{
	DBManager database;
	GetIdName gid;
	String table;
	String type;
	Pool retail;
	
	
	public Hashtable<Object, Object> gethashtable() 
	{
		return null;
	}

	
	public void process(String value) 
	{
		try {
			String classname  = retail.getTable();
			defaultproperty.Defaultproperty defaultproperty;
			java.lang.Class c= java.lang.Class.forName("defaultproperty."+CapitalChar.makeFirstCharCapital(classname.trim()));
			defaultproperty= (defaultproperty.Defaultproperty) c.newInstance();
			defaultproperty.setObject(retail, database);
			defaultproperty.getResult(value);
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (InstantiationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	
	}

	
	public void setObject(Object object, DBManager database) 
	{
		 retail = (Pool) object;	
		 this.database = database;
		 gid = new GetIdName(database);
	}

	
	public void setType(String type, String table) 
	{
		this.type = type;
		this.table =table;
	}


	public void beforeAdd(String value) 
	{
		process(value);
	}
	public void beforeDel(String value) 
	{
		
	}

	public void beforeMod(String value) 
	{	
		
	}	
	public void beforeView(String value) 
	{
			
	}


	public Hashtable<Object, Object> getMasterMap() {
		// TODO Auto-generated method stub
		return null;
	}



	public Vector<Object> getPropertyVector() {
		// TODO Auto-generated method stub
		return null;
	}



	public void setBasicMap(Hashtable<Object, Object> Mastermap) {
		// TODO Auto-generated method stub
		
	}



	public void setDBManager(DBManager database) {
		// TODO Auto-generated method stub
		
	}



	public void setMasterMap(Hashtable<Object, Object> Mastermap) {
		// TODO Auto-generated method stub
		
	}



	public void setPropertyvector(Vector<Object> PropertyVector) {
		// TODO Auto-generated method stub
		
	}

}
